﻿using System.Text.Json.Serialization;

namespace IOP.OpenType
{
    /// <summary>
    /// 字体度量
    /// </summary>
    public class Metrics
    {
        /// <summary>
        /// 字形Id
        /// </summary>
        public uint GId { get; set; }
        /// <summary>
        /// 宽度
        /// </summary>
        public float AdvanceWidth { get; set; }
        /// <summary>
        /// 左边距
        /// </summary>
        public float LeftSideBearings { get; set; }
        /// <summary>
        /// 右边距
        /// </summary>
        public float RightSideBearings { get; set; }
        /// <summary>
        /// 包围盒
        /// </summary>
        [JsonConverter(typeof(BoundingConverter))]
        public Bounding Bounding { get; set; }
        /// <summary>
        /// UV坐标盒
        /// </summary>
        [JsonConverter(typeof(BoundingConverter))]
        public Bounding UVBounding { get; set; }
    }
}
